<template>
    <view class="noData-container">
        <view class="noData">
            <i class="iconfont icon-noData" :style="{'color':iconColor}"></i>
            <view class="text">{{emptyInfo || '暂无相关数据'}}</view>
        </view>
    </view>
</template>

<script setup>
    const props = defineProps({
        iconColor: {
            type: String,
            default: '#CCCCCC'
        },
        emptyInfo: {
            type: String,
            default: '没有相关数据'
        }
    })
</script>

<style lang="scss" scoped>
.noData-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 20rpx;
}

.noData {
    width: 100%;
    max-width: 500rpx;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    .iconfont {
        font-size: 200rpx;
        margin-bottom: 30rpx;
    }
    
    .text {
        font-size: 28rpx;
        color: #999;
        line-height: 1.5;
    }
}
</style>